package com.simple.behavior.classstatus.state;

/**
 * @author simple
 * @version 1.0
 * @date 2019-01-08 11:35
 * @since 1.0
 */
public class Start {
    public static void main(String[] args) {
        State state = new State();
        Context context = new Context(state);
        // 设置第一种状态
        state.setValue("state1");
        context.method();
        // 设置第二种状态
        state.setValue("state2");
        context.method();
    }
}
